.class Les/a7$a;
.super Ljava/lang/Object;
.source "AnimatedMultiThreadGifEncoder.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Les/a7;->a(Landroid/graphics/Bitmap;J)Z
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Ljava/util/concurrent/CountDownLatch;

.field final synthetic b:Les/b7;

.field final synthetic c:Les/a7;


# direct methods
.method constructor <init>(Les/a7;Ljava/util/concurrent/CountDownLatch;Les/b7;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/a7$a;->c:Les/a7;

    iput-object p2, p0, Les/a7$a;->a:Ljava/util/concurrent/CountDownLatch;

    iput-object p3, p0, Les/a7$a;->b:Les/b7;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 5

    .line 1
    iget-object v0, p0, Les/a7$a;->a:Ljava/util/concurrent/CountDownLatch;

    invoke-virtual {v0}, Ljava/util/concurrent/CountDownLatch;->countDown()V

    .line 2
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "content processed"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Thread;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "AnimatedMultiThreadGifEncoder"

    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 3
    new-instance v0, Les/c7;

    iget-object v2, p0, Les/a7$a;->c:Les/a7;

    invoke-static {v2}, Les/a7;->a(Les/a7;)I

    move-result v2

    iget-object v3, p0, Les/a7$a;->c:Les/a7;

    invoke-static {v3}, Les/a7;->b(Les/a7;)Lcom/esfile/screen/recorder/media/util/y;

    move-result-object v3

    invoke-virtual {v3}, Lcom/esfile/screen/recorder/media/util/y;->b()I

    move-result v3

    iget-object v4, p0, Les/a7$a;->c:Les/a7;

    invoke-static {v4}, Les/a7;->b(Les/a7;)Lcom/esfile/screen/recorder/media/util/y;

    move-result-object v4

    invoke-virtual {v4}, Lcom/esfile/screen/recorder/media/util/y;->a()I

    move-result v4

    invoke-direct {v0, v2, v3, v4}, Les/c7;-><init>(III)V

    .line 4
    iget-object v2, p0, Les/a7$a;->c:Les/a7;

    invoke-static {v2}, Les/a7;->c(Les/a7;)Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2, v0}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 5
    iget-object v2, p0, Les/a7$a;->c:Les/a7;

    invoke-static {v2}, Les/a7;->d(Les/a7;)Ljava/util/concurrent/atomic/AtomicBoolean;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z

    move-result v2

    if-eqz v2, :cond_0

    return-void

    .line 6
    :cond_0
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "content will encode"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Thread;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 7
    :try_start_0
    iget-object v2, p0, Les/a7$a;->b:Les/b7;

    invoke-virtual {v0, v2}, Les/c7;->a(Les/b7;)Z

    move-result v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    const-string v2, "encode occurs an error"

    .line 8
    invoke-static {v2, v0}, Lcom/esfile/screen/recorder/utils/n;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    const/4 v0, 0x0

    :goto_0
    if-nez v0, :cond_1

    .line 9
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "content failed"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/Thread;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 10
    iget-object v0, p0, Les/a7$a;->b:Les/b7;

    invoke-virtual {v0}, Les/b7;->a()V

    const-string v0, "encodeFailed!"

    .line 11
    invoke-static {v0}, Lcom/esfile/screen/recorder/utils/n;->a(Ljava/lang/String;)V

    :cond_1
    const-string v0, "content process successfully."

    .line 12
    invoke-static {v1, v0}, Lcom/esfile/screen/recorder/utils/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method
